export default class CustomerError extends Error { 
    constructor(public code: number, public msg: string) { 
        super(msg);
    }
    
    toJSON() { 
        return {
            code: this.code,
            msg: this.msg,
        }
    }
    toString() { 
        return `系统错误,错误码:${this.code}:${this.msg}`;
    }
}